package com.itheima.chapter07.math;

public class demo {
    public static void main(String[] args) {
        //    public static int abs(int a)	返回参数的绝对值
        int abs =Math.abs(-12);
        System.out.println(abs);
        int abs1 =Math.abs(22);
        System.out.println(abs1);
        //    public static double ceil(double a) 向上取整
        double ceil = Math.ceil(11.1);
        double ceil1 = Math.ceil(12.6);
        System.out.println(ceil);
        System.out.println(ceil1);
        //    public static double floor(double a)向下取整 I
        double floor =Math.floor(13.9);
        double floor1 =Math.floor(14.3);
        System.out.println(floor);
        System.out.println(floor1);
        //    public static int round(float a)四舍五入
        float round =Math.round(15.4);
        float round1 =Math.round(16.5);
        System.out.println(round);
        System.out.println(round1);
        //    public static int max(int a,int b)	返回两个int值中的较大值
        int max =Math.max(17,23);
        System.out.println(max);
        //    public static int min(int a,int b)	返回两个int值中的较小值
        int min = Math.min(18,56);
        System.out.println(min);
        //    public static double pow(double a,double b)返回a的b次幂的值
        double pow =Math.pow(2,6);
        System.out.println(pow);
        //    public static double random( )	返回值为double的正值，[0.0,1.0)
        double random = Math.random();
        System.out.println(random);
}

}
